package com.jspeed.providerservice;

import javax.naming.Context;
import javax.naming.InitialContext;

public class ProviderServiceLocator {
	public static ProviderService getProviderServiceLocator() {
		ProviderService providerService = null;
		try {
			final Context context = new InitialContext();
			//Object o = context.lookup("ProviderServiceBean/remote");
			Object o = context.lookup("app/ProviderServiceBean/remote");
			providerService = (ProviderService) o;
			providerService.getProvider(null);
		} catch (Exception ex) {
			ex.printStackTrace();
		}
		return providerService;

	}
}
